package com.jiumi.baseconfig.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jiumi.baseconfig.mapper.BaseMealCourseMapper;
import com.jiumi.baseconfig.domain.BaseMealCourse;
import com.jiumi.baseconfig.service.IBaseMealCourseService;

/**
 * 套餐课程Service业务层处理
 *
 * @author jiumi
 * @date 2023-05-21
 */
@Service
public class BaseMealCourseServiceImpl implements IBaseMealCourseService
{
    @Autowired
    private BaseMealCourseMapper baseMealCourseMapper;

    /**
     * 查询套餐课程
     *
     * @param mealId 套餐课程主键
     * @return 套餐课程
     */
    @Override
    public BaseMealCourse selectBaseMealCourseByMealId(Long mealId)
    {
        return baseMealCourseMapper.selectBaseMealCourseByMealId(mealId);
    }

    /**
     * 查询套餐课程列表
     *
     * @param baseMealCourse 套餐课程
     * @return 套餐课程
     */
    @Override
    public List<BaseMealCourse> selectBaseMealCourseList(BaseMealCourse baseMealCourse)
    {
        return baseMealCourseMapper.selectBaseMealCourseList(baseMealCourse);
    }

    /**
     * 新增套餐课程
     *
     * @param baseMealCourse 套餐课程
     * @return 结果
     */
    @Override
    public int insertBaseMealCourse(BaseMealCourse baseMealCourse)
    {
        return baseMealCourseMapper.insertBaseMealCourse(baseMealCourse);
    }

    /**
     * 修改套餐课程
     *
     * @param baseMealCourse 套餐课程
     * @return 结果
     */
    @Override
    public int updateBaseMealCourse(BaseMealCourse baseMealCourse)
    {
        return baseMealCourseMapper.updateBaseMealCourse(baseMealCourse);
    }

    /**
     * 批量删除套餐课程
     *
     * @param mealIds 需要删除的套餐课程主键
     * @return 结果
     */
    @Override
    public int deleteBaseMealCourseByMealIds(BaseMealCourse baseMealCourse)
    {
        return baseMealCourseMapper.deleteBaseMealCourseByMealIds(baseMealCourse);
    }

    /**
     * 删除套餐课程信息
     *
     * @param mealId 套餐课程主键
     * @return 结果
     */
    @Override
    public int deleteBaseMealCourseByMealId(Long mealId)
    {
        return baseMealCourseMapper.deleteBaseMealCourseByMealId(mealId);
    }
}
